<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h3>欢迎${sessuser.sname }！！</h3>
	<h5>${msg }</h5>
	<form action="${pageContext.request.contextPath }/search.action">
		姓名<input type="text" name="sname">
		男<input type="radio" name="gender" value="1" checked="checked">
		女<input type="radio" name="gender" value="2">
		颜值下限<input type="text" name="yanzhi">
		<input type="submit" value="查找">
	</form>
	
		<table>
			<tr>
				<th>学号</th>
				<th>姓名</th>
				<th>年龄</th>
				<th>性别</th>
				<th>颜值</th>
				<th>**</th>
				<th>**</th>
			</tr>
			<c:forEach var="user" items="${users }">
				<tr>
					<th>${user.sid }</th>
					<th>${user.sname }</th>
					<th>${user.age }</th>
					<th>
						<c:if test="${user.gender==1 }">男</c:if>
						<c:if test="${user.gender==2 }">女</c:if>
					</th>
					<th>${user.yanzhi }</th>
					<th>
						<a href="${pageContext.request.contextPath }/Modify.jsp?sid=${user.sid }">修改</a>
					</th>
					<th>
						<a href="${pageContext.request.contextPath }/Delete.action?sid=${user.sid }">删除</a>
					</th>
				</tr>
			</c:forEach>
		</table>
	<a href="${pageContext.request.contextPath }/Add.jsp">添加</a>
</body>
</html>